package dazuoye;

public class FinalScore {
    private ExamScore examscore;
    
    private int generalscore;
    
    public FinalScore(ExamScore initialExamScore, int initialGeneralScore){
        this.examscore=initialExamScore;
        this.generalscore=initialGeneralScore;
    }
    
    public ExamScore getExamScore(){
        return examscore;
    }
    
    public int getGeneralScore(){
        return generalscore;
    }
    
    public void setGeneralScore(int newGeneralScore){
        generalscore=newGeneralScore;
    }
    
    public int getFinScore(){
    	int s = (int) Math.round(generalscore*0.4+examscore.getScore()*0.6);
        return s;
    }
   
    public String toString(){
        return examscore.getCode()+" "+examscore.getName()+" "+examscore.getSubject()+" "+examscore.getScore()+" "+getGeneralScore()+" "+getFinScore();
    }

   

}
